//
//  HNSH_OrderListManager.m
//  HNSH_SingleProject
//
//  Created by 李宇廷 on 2023/3/1.
//

#import "HNSH_OrderListManager.h"
#import "ST_PageView.h"

@interface HNSH_OrderListManager ()

@end

@implementation HNSH_OrderListManager

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    [self showNavTitle:@"我的订单" showLeftItem:YES];
    
    WeakSelf(weakSelf);
    self.navView.leftBlock = ^{
        if (weakSelf.navigationController.viewControllers.count >= 5) {
            [weakSelf.navigationController popToViewController:weakSelf.navigationController.viewControllers[weakSelf.navigationController.viewControllers.count-5] animated:YES];
        } else {
            [weakSelf.navigationController popViewControllerAnimated:YES];
        }
    };
    
    NSArray *array1 = @[@"HNSH_OrderListViewController",
                        @"HNSH_OrderListViewController",
                        @"HNSH_OrderListViewController",
                        @"HNSH_OrderListViewController",
                        @"HNSH_OrderListViewController"
    ];
    ST_PageView *pageView = [[ST_PageView alloc]initWithFrame:CGRectMake(0, kNavBarAndStatusBarHeight, kScreenWidth, kScreenHeight-kNavBarAndStatusBarHeight) withTitles:@[@"全部",@"待付款",@"待收货",@"已完成",@"已取消"] withViewControllers:array1 withParameters:@[@"",@"1",@"2",@"3",@"4"]];
    pageView.isAnimated = NO;
    pageView.selectedColor = [UIColor appBlackLabelColor];
    pageView.unselectedColor = [UIColor appGrayLabelColor];
    pageView.leftSpace = pageView.rightSpace = 44;
//    pageView.lineWidth = 21;
    //pageView.isTranslucent = YES;
    pageView.isShowTopTabBottomLine = NO;
    pageView.isAverage = YES;
    pageView.font = [UIFont systemFontOfSize:16];
    pageView.defaultSubscript = self.index;
    pageView.scrollView.backgroundColor = [UIColor appWhiteLabelColor];
    [self.view addSubview:pageView];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
